package com.example.leetdemo.process;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public class Solution2369 {


    public boolean validPartition(int[] nums) {
        if (nums.length < 2) {
            return false;
        }
        int[][] dp = new int[nums.length][2];

        return false;
    }

    public static void main(String[] args) {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("123", 111);
        BigDecimal b = jsonObject.getBigDecimal("123");
        System.err.println(b.toString());
        System.err.println(jsonObject.getString("123"));
        System.err.println(JSON.toJSONString(jsonObject, SerializerFeature.WriteMapNullValue));


        Tess tess = new Tess();
        tess.setA(1);
        Object o = tess;
        JSONObject object = (JSONObject) JSONObject.toJSON(o);
        System.err.println(object.toJSONString());

        List<Tess> tessList = new ArrayList<>();
        tessList.add(tess);
        Object o1 = tessList;
        JSONArray jsonArray = (JSONArray) JSONArray.toJSON(o1);
        for (Object o2 : jsonArray) {
            JSONObject ttt = (JSONObject) o2;
            System.err.println(ttt.toJSONString());
        }

    }

    @Data
    public static class Tess {
        int a;
    }


}
